<template>
	<div>
		<p class="title">首页</p>
		<ul class="menu">
			<li v-for="(item, index) in menu" :key="index" @click="go(item.path)">
				{{ item.title }}
			</li>
		</ul>
	</div>
</template>

<script setup name="home">
import router, { menu } from '@/router';

const go = path => {
	router.push(path);
};
</script>

<style lang="less" scoped>
.menu {
	display: flex;
	li {
		padding: 20px;
		background: #000;
		color: #fff;
		font-weight: 20px;
		margin-right: 10px;
		cursor: pointer;
	}
}
</style>
